package com.dgut.cbd.finalexp.entity;


import com.dgut.cbd.finalexp.dto.RecordInfo;
import lombok.Data;

import java.util.Date;

/**
 * @Program: demo
 * @Description:
 * @Author: cbd
 * @Create: 2021-06-27
 * @Version: 1.0.0
 **/
@Data
public class Record {

    String dateString;
    String name;
    String id;
    String stuId;
    String phone;
    String health;
    String dangerPeopleContact;

    //    String locationProvince;
//    String locationCity;
//    String locationVillage;
    String nowLocation;

    Double temperature;
    Date date;
    String emergencyContactPhone;
    String emergencyContactName;
    String dangerAreaReach;
    String dangerMark;

    public Record(){

    }

    public Record(RecordInfo recordInfo) {
        Record t = this;
        t.stuId = recordInfo.getStuId();
        t.phone = recordInfo.getPhone();
        t.health = recordInfo.getHealth();
        t.dangerPeopleContact = recordInfo.getDangerPeopleContact();
        t.temperature = recordInfo.getTemperature();
        t.date = recordInfo.getDate();
        t.emergencyContactPhone = recordInfo.getEmergencyContactPhone();
        t.emergencyContactName = recordInfo.getEmergencyContactName();
        t.dangerAreaReach = recordInfo.getDangerAreaReach();
        t.dangerMark = recordInfo.getDangerMark();
        t.nowLocation = recordInfo.getLocationProvince() + "-" + recordInfo.getLocationCity() + "-" + recordInfo.getLocationVillage();
    }

}
